import { defHttp } from '@/utils/http/axios';
import { type UserMetricsParams,type UserMetricsPage,type UserMetrics } from './model/metrics';


enum Api {
  getList = '/analyze/user/metrics/getList',
  getCKFList = '/analyze/user/metrics/getCKFList',
  getIP4List = '/analyze/user/metrics/getIP4List',
  getJA4List = '/analyze/user/metrics/getJA4List',
  
  getListCount = '/analyze/user/metrics/getListCount',
  getCKFListCount = '/analyze/user/metrics/getCKFListCount',
  getIP4ListCount = '/analyze/user/metrics/getIP4ListCount',
  getJA4ListCount = '/analyze/user/metrics/getJA4ListCount',

  getHostList = '/analyze/user/metrics/getHostList',
  getRefererList = '/analyze/user/metrics/getRefererList',
}
export function getHostList(data: UserMetricsParams) {
  return defHttp.post<UserMetrics[]>({ url: Api.getHostList,data });
}
export function getRefererList(data: UserMetricsParams) {
  return defHttp.post<UserMetrics[]>({ url: Api.getRefererList,data });
}

export function getList(data: UserMetricsParams) {
  return defHttp.post<UserMetricsPage>({ url: Api.getList,data });
}
export function getCKFList(data: UserMetricsParams) {
  return defHttp.post<UserMetricsPage>({ url: Api.getCKFList,data });
}
export function getIP4List(data: UserMetricsParams) {
  return defHttp.post<UserMetricsPage>({ url: Api.getIP4List,data });
}
export function getJA4List(data: UserMetricsParams) {
  return defHttp.post<UserMetricsPage>({ url: Api.getJA4List,data });
}
export function getListCount(data: UserMetricsParams) {
  return defHttp.post<Number>({ url: Api.getListCount,data });
}
export function getCKFListCount(data: UserMetricsParams) {
  return defHttp.post<Number>({ url: Api.getCKFListCount,data });
}
export function getIP4ListCount(data: UserMetricsParams) {
  return defHttp.post<Number>({ url: Api.getIP4ListCount,data });
}
export function getJA4ListCount(data: UserMetricsParams) {
  return defHttp.post<Number>({ url: Api.getJA4ListCount,data });
}

